/*
 * @(#)Resource.java $version 2012-3-2
 * 
 * Copyright 2011 RogueDevelopment Gruop. All rights Reserved.
 * ROGUEDEVELOPMENT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nadostar.extensions.util;

import java.io.InputStream;
import java.net.URL;
import java.util.Collection;

/**
 * @author LEESUNG
 * 
 */
public interface Resource {
	/**
	 * Name.
	 * 
	 * @return the string
	 */
	String name();

	/**
	 * Children.
	 * 
	 * @return the collection< resource>
	 * 
	 * @throws Exception
	 *             the exception
	 */
	Collection<Resource> children() throws Exception;

	/**
	 * Resource.
	 * 
	 * @return the uRL
	 * 
	 * @throws Exception
	 *             the exception
	 */
	URL resource() throws Exception;

	/**
	 * Open stream.
	 * 
	 * @return the input stream
	 * 
	 * @throws Exception
	 *             the exception
	 */
	InputStream openStream() throws Exception;

	/**
	 * Terminal.
	 * 
	 * @return true, if successful
	 */
	boolean terminal();
}
